<?php

namespace app\modules\admin\services;

use app\common\services\BaseService;
use app\models\Admin;

class AdminService extends BaseService{

    /**
     * 根据用户名登陆
     * @param $username
     * @return null|Admin
     */
    public static function loginByUserName($username)
    {
        return Admin::findOne(['username'=>$username]);
    }
}